package net.xiduth.game.player.content.citadels;

import net.xiduth.game.player.dialogues.Dialogue;

@SuppressWarnings("unused")
public class Enter extends Dialogue {


	@Override
	public void start() {
		sendDialogue(
				"You have the option to join ones citadel, or create your",
				"own. Which one would you like to do?");

	}

	@Override
	public void run(int interfaceId, int componentId) {
		switch(stage) {
		case -1:
			stage = 0;
			sendOptionsDialogue(SEND_DEFAULT_OPTIONS_TITLE, "This does nothing", "Join my own");
			break;
		case 0:
			if(componentId == OPTION_2) {
				new Citadel(player);
				stage = 1;
			} else {
				stage = 2;
			}
			break;
		case 1:
			stage = -2;
			new Citadel(player);
			break;
		case 2:
				stage = 3;
				player.getTemporaryAttributtes().put("Join_Citadel", true);
				player.getPackets().sendRunScript(109, "Enter Name:");
				//player.getTemporaryAttributtes().put("JoinCitadel", Boolean.TRUE);
			
			break;
		default:
			end();
			break;
		}
	}

	@Override
	public void finish() {

	}

}
